tools/go: honor append build flags
authorRoger Pau Monne <roger.pau@citrix.com>
Wed, 7 Jul 2021 07:15:31 +0000 (09:15 +0200)
committerIan Jackson <iwj@xenproject.org>
Mon, 13 Sep 2021 12:38:36 +0000 (13:38 +0100)
Make the go build use APPEND_{C/LD}FLAGS when necessary, just like
other parts of the build.

Reported-by: Ting-Wei Lan <lantw44@gmail.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Nick Rosbrook <rosbrookn@ainfosec.com>
Acked-by: Ian Jackson <iwj@xenproject.org>
tools/golang/xenlight/Makefile

index e394ef9b2b4907441f9ac89295d19b9f6c69d05c..64671f246c10c2416706b38abb4712317de83c97 100644 (file)
@@ -27,7 +27,7 @@ GOXL_GEN_FILES = types.gen.go helpers.gen.go
 # so that it can find the actual library.
 .PHONY: build
 build: xenlight.go $(GOXL_GEN_FILES)
-       CGO_CFLAGS="$(CFLAGS_libxenlight) $(CFLAGS_libxentoollog)" CGO_LDFLAGS="$(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) -L$(XEN_libxenlight) -L$(XEN_libxentoollog)" $(GO) build -x
+       CGO_CFLAGS="$(CFLAGS_libxenlight) $(CFLAGS_libxentoollog) $(APPEND_CFLAGS)" CGO_LDFLAGS="$(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) -L$(XEN_libxenlight) -L$(XEN_libxentoollog) $(APPEND_LDFLAGS)" $(GO) build -x
 
 .PHONY: install
 install: build